package com.zrgk.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;

import com.zrgk.bean.DeptBean;
import com.zrgk.dao.DeptDao;
import com.zrgk.util.PageUtil;
@Service(value="deptService")
@Transactional(propagation=Propagation.REQUIRED)
public class DeptServiceImpl implements DeptService {
	@Autowired
	@Qualifier(value="deptDao")
	private DeptDao deptDao;
	

	public DeptDao getDeptDao() {
		return deptDao;
	}

	public void setDeptDao(DeptDao deptDao) {
		this.deptDao = deptDao;
	}

	public void findDeptByPage(PageUtil pageUtil) {
		List<DeptBean> depts=null;
		depts=deptDao.selectAllDept();
		pageUtil.setList(depts);
	}
	
	
	public List<DeptBean> findAllDept() {
		List<DeptBean> depts=null;
		depts=deptDao.selectAllDept();
		return depts;
	}

	public void addDept(DeptBean dept) {
		// TODO Auto-generated method stub
		
	}

	public void updateDept(DeptBean dept) {
		// TODO Auto-generated method stub
		
	}

	public void deleteDept(int id) {
		// TODO Auto-generated method stub
		
	}
	
	
}
